import request from '../utils/request'

// 登录
export function login() {
  return request({
    url: '/jwt/login',
    method: 'get',
    params: {
      username: _Glob.username,
      password: _Glob.password
    }
  })
}
export function getWeather() {
  return request({
      url: 'https://restapi.amap.com/v3/weather/weatherInfo?city=440300&key=92206b220aa13582d6416e06099408cb',
      method: 'get'
  })
}






//查询不同状态统计数据 addrCode(C中心馆 N北馆) 右上角
export function feachDevStatusCount(addrCode) {
  return request({
    url: '/bigScreen/selectDevStatusCount',
    method: 'get',
    params: {
      addrCode: addrCode
    }
  })
}





//统计所有设备类型 中上
export function feachAllTypes() {
  return request({
    url: '/bigScreen/selectAllTypesTwo',
    method: 'get',
  
  })
}







//查询各类设备报警次数统计,addrCode(C中心馆 N北馆) 
export function feachLogByType(addrCode) {
  return request({
    url: '/bigScreen/selectLogByType',
    method: 'get',
    params: {
      addrCode: addrCode
    }
  })
}


//获取地址
export function userAddrAndType() {
  return request({
    url: '/bigScreen/selectAddress',
    method: 'get',
    // params: {
    //   username: _Glob.username
    // }
  })
}

//获取设备分类/类型
export function selectDevTypes(data) {
  return request({
    url: '/bigScreen/selectDevTypes',
    method: 'post',
    data:data

  })
}


//查询报警 日 周 月 趋势图
export function getAlarmTimeList(addrCode,type) {
  return request({
    url: '/bigScreen/selectMonitorLine',
    method: 'get',
    params: {addrCode:addrCode,type:type}
  })
}



//获取设备报警日志
export function getAlarmDataList(addrCode) {
  return request({
    url: '/bigScreen/selectMonitorLogs',
    method: 'get',
    params: {addrCode:addrCode}
   
  
  })
}

//获取设备状态
export function selectAll(query) {
  return request({
    url: '/bigScreen/selectAllDevStatus',
    method: 'post',
    params: {devTypeCode:query.devTypeCode},
    data:query.addrCodes,
    
  })
}






